﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using FBEntities;
using FBEntities.FBObjects.User;

namespace XDAFacebook
{
    public partial class Home : Form
    {
        public Home()
        {
            InitializeComponent();
        }

        public void loadData(FBPerson me)
        {
            lvMainList.Items.Add(new ListViewItem("Name: " + me.name));
            lvMainList.Items.Add(new ListViewItem("Status: " + me.Statuses.data.OrderBy(s=>s.updated_time).Last().message));

            foreach(var news in me.Home.data)
            {
                lvMainList.Items.Add(new ListViewItem("Name: " + news.name));
                lvMainList.Items.Add(new ListViewItem("Message: " + news.message));
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            base.Close();
        }
    }
}